package com.digital.smartgrow.controller.datacenter;


import com.digital.smartgrow.dto.datacenter.SysDictTypePageDTO;
import com.digital.smartgrow.service.datacenter.SysDictTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 字典类型表 前端控制器
 * </p>
 *
 * @author sunyuechao
 * @since 2022-07-11
 */
//@Api(tags = "字典类型表")
//@RestController
//@RequestMapping("${context.prefix}/sysDictType")
public class SysDictTypeController {

    @Autowired
    private SysDictTypeService sysDictTypeService;

    @ApiOperation(value = "列表分页查询")
    @PostMapping("/getListByPage")
    public Object getListByPage(@RequestBody SysDictTypePageDTO sysDictTypePageDTO){
        return sysDictTypeService.getListByPage(sysDictTypePageDTO);
    }

    @ApiOperation(value = "字典类型表详情")
    @GetMapping("/getInfo")
    public Object getInfo(Integer id){
        if (id == null) return "id不能为空";
        return sysDictTypeService.getInfo(id);
    }
}
